<div class="modal-dialog modal-md">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button"
                    class="close"
                    data-dismiss="modal"
                    aria-label="Close"
                    ng-click="closeThisDialog()" style="outline: none;"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">
                <span ng-show="record.type === 0">新增进货记录</span>
                <span ng-show="record.type === 1">新增出库记录</span>
            </h4>
        </div>
        <form role="form" ng-submit="submit()">
            <div class="modal-body">
            <div class="form-group">
                <label class="control-label">物料名称</label>
                <span type="text"
                      class="form-control disabled"
                      ng-bind="sku.product.name" readonly=""></span>
                <span ng-show="error.sku_id" class="label label-danger" ng-bind="error.sku_id"></span>
            </div>
            <div class="form-group">
                <label class="control-label">物料分类</label>
                <span type="text"
                      class="form-control disabled"
                      ng-bind="sku.product.category.name" readonly=""></span>
            </div>
            <div class="form-group">
                <label class="control-label">物料单位</label>
                <span type="text"
                      class="form-control"
                      ng-bind="sku.product.unit" readonly=""></span>
            </div>
            <div class="form-group"  ng-show="record.type === 0">
                <label for="record-new-price" class="control-label">单位价格 (元)</label>
                <input ng-focus="error.price=''"
                       class="form-control"
                       ng-model="record.price"
                       id="record-new-price"
                       rows="5"
                       placeholder="单位价格 (元)"/>
                <span ng-show="error.price" class="label label-danger" ng-bind="error.price"></span>
                <span ng-show="error.type" class="label label-danger" ng-bind="error.type"></span>
            </div>
            <div class="form-group">
                <label for="record-new-quantity" class="control-label" ng-show="record.type === 0">进库量</label>
                <label for="record-new-quantity" class="control-label" ng-show="record.type === 1">出库量</label>
                <input ng-focus="error.quantity=''"
                       class="form-control"
                       ng-model="record.quantity"
                       id="record-new-quantity"
                       rows="5"
                       placeholder="请输入进/出库量"/>
                <span ng-show="error.quantity" class="label label-danger" ng-bind="error.quantity"></span>
            </div>
            <div class="form-group">
                <label for="record-new-notes" class="control-label">备注信息</label>
                <textarea ng-focus="error.notes=''"
                          class="form-control"
                          ng-model="record.notes"
                          id="record-new-notes"
                          rows="5"
                          placeholder="备注信息"></textarea>
                <span ng-show="error.notes" class="label label-danger" ng-bind="error.notes"></span>
            </div>
        </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="closeThisDialog()">关闭</button>
                <button type="submit" ladda="saveLoading" class="btn btn-primary">保存</button>
            </div>
        </form>
    </div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->